package general.interfaces;

import general.datastructures.Vector2f;

import java.util.Vector;

import sun.reflect.generics.reflectiveObjects.NotImplementedException;


/**
 * This Interface should be implemented by all Classes which are able to move
 * 
 * @author tim
 * @since 0.3.0
 * @version 0.5
 */
public interface IMovable {
	
	/**
	 * 
	 * @return The remaining fuel of the {@link IMovable}
	 */
	double getFuelAmount();
	
	/**
	 * This Method should refuel the {@link IMovable}. If the passed amount of fuel is larger than
	 * the {@link IMovable} can hold, the {@link IMovable} only loads until it is full and returns 
	 * this amount
	 * 
	 * @param amount The maxium amount of fuel which could be loaded to this {@link IMovable}
	 * @return the Amount of fuel which was loaded absolutly
	 */
	double refuel(double amount);
	
	/**
	 * @return the {@link Point} where the {@link IMovable} is located
	 */
	Vector2f getPosition();
	
	/**
	 * @since 0.5.0
	 * @return the current {@link Vector} of Way{@link Point}s, which this {@link IMovable} will move along
	 * @throws NotImplementedException This Exception should be thrown by all Classes which do not support the upcomming realtime Mode
	 */
	Vector<Vector2f> getWaypoints();
	
	/**
	 * @since 0.5.0
	 * @param waypoints The {@link Vector} of Way{@link Point}s which should be appended to the {@link IMovable}s route
	 * @throws NotImplementedException This Exception should be thrown by all Classes which do not support the upcomming realtime Mode
	 */
	void appendWaypoints(Vector<Vector2f> wc_waypoints);
	
	/**
	 * @since 0.5.0
	 * @param waypoints The {@link Vector} of Way{@link Point}s which will replace the existing route of the {@link IMovable}
	 * @throws NotImplementedException This Exception should be thrown by all Classes which do not support the upcomming realtime Mode 
	 */
	void setWaypoints(Vector<Vector2f> wc_waypoints);
	
	/**
	 * Tells the {@link IMovable} to stop
	 */
	void stopMoving();

	/**
	 * Tells the {@link IMovable} to resume his way along the Waypoints
	 */
	void continueMoving();	
	
	public boolean isMoving();
}
